<template>
    <div class="form-container">
        <vue-form ref="vueForm" :config="formConfig" @submit="submit" @reset="resetFields"></vue-form>
    </div>
</template>

<script>

    import utils from '../../utils/utils';
    import formConfig from './page-data'

  export default {
    name: "Index",
    data() {
      return {
        formConfig: formConfig,
      }
    },
    computed: {},
    methods: {
      submit() {
        utils.alert('提交')
      },
      resetFields(){
        utils('确定要重置表单吗？', ()=>{
          this.$refs['vueForm'].resetFields();
        })
      },
    },
    mounted() {

    },
    created() {

    },
  }
</script>

<style scoped>
    .form-container{
        max-width: 680px;
        margin: 0 auto;
        padding: 15px 0;
    }
</style>
